package user

import (
	"context"
	"gf-xb-api/internal/service"

	v1 "gf-xb-api/api/user/v1"
)

func (c *ControllerV1) Logout(ctx context.Context, req *v1.LogoutReq) (res *v1.LogoutRes, err error) {
	output, err := service.User().Logout(ctx)
	if err != nil {
		return nil, err
	}

	return (*v1.LogoutRes)(&output), nil
}
